IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[UpdateProductoDepartamento]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[UpdateProductoDepartamento]
GO

CREATE PROCEDURE [dbo].[UpdateProductoDepartamento]
(
	@IdProducto int,
	@IdDepartamento int,
	@Stock int,
	@Precio money,
	@Estado bit
)
AS
BEGIN
	SET NOCOUNT ON

	UPDATE [ProductoDepartamento]
	SET [Stock] = @Stock, 
		[Precio] = @Precio, 
		[Estado] = @Estado
	WHERE [IdProducto] = @IdProducto AND [IdDepartamento] = @IdDepartamento

	SET NOCOUNT OFF
END

GO
